package hcontroller

import (
	"advertoper/controllers"
	"advertoper/homepageinfo/hservice"
)

type RouterTableController struct {
	controllers.URLSignController
}

//路由表的获取
func (p *RouterTableController) GetRouterTable() {
	defer p.Output("GetRouterTable")
	p.ForceHTTPS()

	plat := 1
	if p.Appkey == "cc0dec8c07444e9dadb75d41218c4fe4" {
		plat = 2
	}
	v, _ := p.GetInt("v", 1)

	code, msg, data := hservice.GetRouterTableService().GetRouterTable(plat, v)
	p.Resp["code"] = code
	p.Resp["msg"] = msg
	if code == 0 {
		p.Resp["data"] = data
	}
}

//获取客户端在线参数
func (p *RouterTableController) GetOnLineParameters() {
	defer p.Output("GetOnLineParameters")
	p.ForceHTTPS()

	plat := 1
	if p.Appkey == "cc0dec8c07444e9dadb75d41218c4fe4" {
		plat = 2
	}
	code, msg, data := hservice.GetRouterTableService().GetOnLineParameters(plat)
	p.Resp["code"] = code
	p.Resp["msg"] = msg
	if code == 0 {
		p.Resp["data"] = data
	}
}
